# 2021-8-28 龟速合并 by 困惑的xjl
from django.urls import path
from questionnaire import views_answers, views_cross_statistics, views_edit, views_export, views_judge_page, views_list
from questionnaire import views_preview, views_pulish, views_statistics, views_vote

urlpatterns = [
    # views_answers
    path('answer/', views_answers.answerQuestionnaire),
    path('check/', views_answers.checkQuestionnaire),
    path('getanswer/', views_answers.getAnswers),
    path('submit/', views_answers.submitQuestionnaire),
    path('getaddress/', views_answers.fillInPositioning),
    # views_cross_statistics
    path('cross_statistic/', views_cross_statistics.crossStatistics),
    path('cross_statistic_get_info/', views_cross_statistics.getQuestionInfo),
    # views_edit
    path('change/', views_edit.changeSettings),
    path('code/', views_edit.code),
    path('createquestionnaire/', views_edit.createQuestionnaire),
    path('decode/', views_edit.decode),
    path('delete_question/', views_edit.deleteQuestion),
    path('delete_questionnaire/', views_edit.deleteQuestionnaire),
    path('examquestionnaire/', views_edit.editExamQuestionnaire),
    path('getquestionnairetype/', views_edit.getQuestionnaireType),
    path('getstatus/', views_edit.getStatus),
    path('questions/', views_edit.addQuestion),
    path('questionnaires/', views_edit.addQuestionnaire),
    path('sendQuestionnaire/', views_edit.editQuestionnaire),
    path('settings/', views_edit.getSettings),
    path('switch/', views_edit.changeStatus),
    path('checkbeforeedit/', views_edit.checkBeforeEdit),
    path('isallowed/', views_edit.ifAllowed),

    # views_export
    path('export/', views_export.exportStatistics),
    path('export_questionnaire/', views_export.exportQuestionnaire),
    path('export_raw_data/', views_export.exportRawData),
    path('export_statistical_data/', views_export.exportStatistics),

    # views_judge_page
    path('judge_page/', views_judge_page.showJudge),
    # views_list
    path('change_status/', views_list.changeStatus),
    path('delete/', views_list.deleteQuestionnaire),       #加入回收站
    path('delete_list/', views_list.deleteList),
    path('questionnaire_copy/', views_list.copyQuestionnaire),
    path('questionnaire_search/', views_list.searchQuestionnaire),
    path('questionnaire_sort/', views_list.questionnaireSort),
    # views_preview
    path('preview/', views_preview.preview),
    path('answer_preview/', views_preview.previewWithoutAnswer),
    # views_pulish
    path('pulish/', views_pulish.publishQuestionnaireFirstly),
    path('qrcode/', views_pulish.createQrCode),
    # views_statistics
    path('statistic/', views_statistics.getStatisticalData),
    # views_vote
    path('vote_statistic/', views_vote.getVoteData)
]
